#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>

 struct ListNode {
    int val;
    struct ListNode *next;
};
 
struct ListNode* addTwoNumbers(struct ListNode* l1, struct ListNode* l2)
{
    int i = 1;
    int ret = 0;
    struct ListNode* a = l1;
    struct ListNode* b = l2;
    while (a->next && b->next)
    {
        ret += (a->val + b->val) * i;
        a = a->next;
        b = b->next;
        i *= 10;
    }
    if (a->next)
    {
        while (a->next)
        {
            ret += (a->val) * i;
            a = a->next;
            i *= 10;
        }

    }
    if (b->next)
    {
        while (b->next)
        {
            ret += (b->val) * i;
            b = b->next;
            i *= 10;
        }
    }
    return ret;
}

int main()
{
    return 0;
}